home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-21 | 3.2 KB | 114 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWPicShp.h
- // Release Version: $ 1.0d1 $
- //
- // Creation Date: 4/13/94
- //
- // Copyright: © 1994 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWPICSHP_H
- #define FWPICSHP_H
-
- #ifndef FWSHAPE_H
- #include "FWShape.h"
- #endif
-
- #ifndef FWBNDSHP_H
- #include "FWBndShp.h"
- #endif
-
- //========================================================================================
- // •• Forward Declarations
- //========================================================================================
-
- class FW_CGraphicContext;
- class FW_CPictShapeRep;
- class FW_CBitmapShape;
-
- //========================================================================================
- // •• CLASS FW_CPictShape
- //========================================================================================
-
- class FW_CPictShape : public FW_CShape
- {
- //----------------------------------------------------------------------------------------
- // • Constructors
- //
- public:
- FW_CPictShape();
- FW_CPictShape(FW_PlatformPict platformPict);
- FW_CPictShape(FW_PlatformPict platformPict, const FW_CRect& rect);
-
- FW_CPictShape(FW_CPictShapeRep* rep);
- FW_CPictShape(const FW_CPictShape& other);
-
- //----------------------------------------------------------------------------------------
- // • Operators
- //
- public:
- FW_CPictShape& operator=(const FW_CPictShape& other);
- FW_CPictShape& operator=(FW_CPictShapeRep* other);
-
- FW_CPictShapeRep* operator->() const
- {return (FW_CPictShapeRep*)GetRep();}
-
- //----------------------------------------------------------------------------------------
- // • Conversion
- //
- operator FW_CBitmapShape() const;
- };
-
- //========================================================================================
- // •• class FW_CPictShapeRep
- //========================================================================================
-
- class FW_CPictShapeRep : public FW_CBoundedShapeRep
- {
- friend class FW_CPictShape;
-
- //----------------------------------------------------------------------------------------
- // • Constructors/Destructors
- //
- protected:
- FW_CPictShapeRep();
- FW_CPictShapeRep(FW_PlatformPict platformPict, const FW_CRect& rect);
-
- virtual ~FW_CPictShapeRep();
-
- //---------------------------------------------------------------------------------------
- // • Inherited API
- //
- public:
- // ----- Hit Test -----
- FW_HitTestPart HitTest(const FW_CPoint& test) const;
-
- // ----- Rendering -----
- virtual void Draw(FW_CGraphicContext* graphicContext);
-
- // ----- Default shape -----
- virtual void SetAsDefault() const;
-
- // ----- Stream -----
- virtual void Flatten(FW_CWritableStream& stream);
- virtual void Unflatten(FW_CReadableStream& stream);
-
- //---------------------------------------------------------------------------------------
- // • New API
- //
- public:
- FW_CPictShape Copy() const;
-
- FW_PlatformPict GetPlatformPict() const
- {return fPlatformPict;}
- void SetPlatformPict(FW_PlatformPict platformPict);
-
- //---------------------------------------------------------------------------------------
- // • Data Member
- //
- FW_PlatformPict fPlatformPict;
- };
-
- #endif